﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Styx;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
using Styx.Helpers;
using Styx.TreeSharp;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Action = Styx.TreeSharp.Action;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Styx.Pathing;
using Styx.Common;
using System.Windows.Media;
using Styx.CommonBot.Frames;
using System.Diagnostics;


namespace Guardian
{
    public partial class Combat : CombatRoutine
    {
        Composite LowbieRotation()
        {
            return new PrioritySelector(
                new Decorator(ret => gotTarget && !SpellManager.HasSpell(CAT_FORM),
                    new PrioritySelector(
                        
                        Cast(MOONFIRE, ret => gotTarget
                            && SpellManager.HasSpell(MOONFIRE) 
                            && !debuffExists(MOONFIRE, Me.CurrentTarget)
                            && IsInRange(39, Me.CurrentTarget)),
                        Cast(WRATH, ret => gotTarget && IsInRange(39, Me.CurrentTarget)))
                        ),
                new Decorator(ret => gotTarget && SpellManager.HasSpell(CAT_FORM),
                    new PrioritySelector(
                        
                        Cast(FEROCIOUS_BITE, ret => Me.ComboPoints >= 3 && Me.CurrentTarget.IsWithinMeleeRange),
                        Cast(RAKE, ret => !debuffExists(RAKE, Me.CurrentTarget) && Me.CurrentTarget.IsWithinMeleeRange),
                        Cast(MANGLE, ret => gotTarget && Me.CurrentTarget.IsWithinMeleeRange)))
                        
                );
        }


    }
}
